package res

import (
	"backend/internal/types"
)

// Success 返回成功
/*
Author: LiuFeiHua
Date: 2025/4/28 10:03
*/
func Success() (*types.BaseResponse, error) {
	return &types.BaseResponse{
		Status: 200,
		Msg:    "操作成功",
		Data:   true,
	}, nil
}

// Error 返回失败(默认)
func Error(msg string) *types.BaseResponse {
	return &types.BaseResponse{
		Status: 400,
		Msg:    msg,
		Data:   false,
	}
}
